package studentinformationmanagementsystem.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 苗庆
 * @version 1.0
 * 课程实体类对象
 */
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    //课程id
    private Integer courseid;

    //课程名称
    private String coursename;

    //课程学分
    private String coursecredit;

    //课程学时
    private String period;

    //课程类型  ：必修、选修
    private   String type;

    //课程编号即展示的的课程id
    private String number;

    //是否已经删除 0未删除 1已经删除
    private Integer IsDelete;


    public Course(Integer courseid, String coursename, String coursecredit, String period, String type, String number, Integer isDelete) {
        this.courseid = courseid;
        this.coursename = coursename;
        this.coursecredit = coursecredit;
        this.period = period;
        this.type = type;
        this.number = number;
        IsDelete = isDelete;
    }

    public Course() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Course course = (Course) o;
        return courseid.equals(course.courseid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(courseid);
    }

    @Override
    public String toString() {
        return "Course{" +
                "courseid=" + courseid +
                ", coursename='" + coursename + '\'' +
                ", coursecredit='" + coursecredit + '\'' +
                ", period='" + period + '\'' +
                ", type='" + type + '\'' +
                ", number='" + number + '\'' +
                ", IsDelete=" + IsDelete +
                '}';
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getCourseid() {
        return courseid;
    }

    public void setCourseid(Integer courseid) {
        this.courseid = courseid;
    }

    public String getCoursename() {
        return coursename;
    }

    public void setCoursename(String coursename) {
        this.coursename = coursename;
    }

    public String getCoursecredit() {
        return coursecredit;
    }

    public void setCoursecredit(String coursecredit) {
        this.coursecredit = coursecredit;
    }

    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public Integer getIsDelete() {
        return IsDelete;
    }

    public void setIsDelete(Integer isDelete) {
        IsDelete = isDelete;
    }
}
